{extend name="base/common"}

{block name="style"}
<style>
    .shadow{width: 100%;height: 100%;position: absolute;left: 0;top: 0;background: rgba(0,0,0,0.4);z-index: 88;}
    .b,.c{cursor: pointer;}
</style>
{/block}

{block name="page-header"}
<div class="row wrapper border-bottom white-bg page-heading">
    <div class="col-lg-10">
        <h2>班型分配</h2>
        <ol class="breadcrumb">
            <li>
                <a href="{:Url('Type/index')}">班型</a>
            </li>
            <li class="active">
                <strong>学员列表</strong>
            </li>
        </ol>
    </div>
    <div class="col-lg-2">
    </div>
</div>
{/block}

{block name="main"}
<div class="wrapper wrapper-content animated fadeInRight">
    <div class="row">
        <div class="col-lg-12">
            <div class="ibox float-e-margins">
                <div class="ibox-title">
                    <h3 style="color: green;float: left">* {$class}</h3>
                    <form method="get" action="">
                        <div class="col-sm-3">
                            <div class="input-group">
                                <input type="text" placeholder="输入VIP或@姓名" class="input-sm form-control" name="name" value="{notempty name='Think.get.name'}{$Think.get.name}{/notempty}">
                                <input type="hidden"  name="id" value="{$id}">
                                <input type="hidden"  name="party" id="party" value="{$party}">
                            <span class="input-group-btn">
                                <button type="submit" class="btn btn-sm btn-primary">查询</button>
                            </span>
                            </div>
                        </div></form>
                    <div class="ibox-tools">
                        年级筛选&emsp;
                        <select name="party" onchange="changeParty()">
                            {volist name="years" id="yy"}
                            <option value="{$yy}" {eq name="$party" value="$yy"} selected {/eq}>{eq name="$yy" value="0"}全部{else/}{$yy}{/eq}</option>
                            {/volist}
                        </select>
                        &emsp;
                        <a data-toggle="modal" class="btn btn-sm btn-primary" href="{:Url('Type/two?id='.$id)}">学员添加</a>&emsp;
                        <a href="javascript:window.history.go(-1);" class="btn btn-white btn-sm"><i class="fa fa-reply"></i> 返回</a>
                    </div>
                </div>
                <div class="ibox-content">
                    <div class="table-responsive">
                        <table class="table table-striped">
                            <thead>
                            <tr>
                                <th>姓名</th>
                                <th>VIP账号</th>
                                <th>所属学校</th>
                                <th>手机号</th>
                            </tr>
                            </thead>
                            <tbody>
                            {volist name="list" id="vo"}
                            <tr >
                                <td width="10%">{$vo.name}</td>
                                <td width="15%">{$vo.order_id}</td>
                                <td class="name" width="60%">{$vo.school_id|getSchool}</td>
                                <td width="15%">{$vo.tel}</td>
                            </tr>
                            {/volist}
                            </tbody>
                            <tfoot>
                            <tr>
                                <td colspan="10">
                                    <div class="page">{$list->render()}</div>
                                </td>
                            </tr>
                            </tfoot>
                        </table>
                    </div>
                </div>
            </div>
        </div>
    </div>
</div>
<iframe id="iframe" src="" style="height: 80%;width: 392px;z-index: 99;position: absolute;top: 10%;border: 0;left: 32%;background: #fff;display: none;" scrolling="auto" seamless></iframe>
<div class="shadow" style="display: none"></div>
{/block}

{block name="script"}
<script src="__ADMIN__/js/plugins/iCheck/icheck.min.js"></script>
<script>
    var ids ="{$id}";
    highlight_subnav("{:Url('Type/index')}");
    function changeParty(){
        var party = $("select[name='party']").val();
        $("input[name='party']").val(party);
        var school_id = "{$id}";
        location.href = "{:Url('Type/three')}?id="+school_id+"&party="+party;
    }
</script>
{/block}